home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
326-350
/
disk_328
/
roadroute
/
route.doc
< prev
next >
Wrap
Text File
|
1992-05-06
|
7KB
|
136 lines
Road Route
Fred Mayes
February issue of the CUB Newsletter
Commodore Users of Bartlesville
Well, I figured that I would demo some games again this year for
the Computer Fair, but about two weeks before the event I
discovered a program written by Jim Butterfield on Fred Fish disk
251 called RoadRoute. You enter the town you are leaving from,
the town you want to go to, and if you want to go through a
special town to get there. Then you are given the total length
of the trip and how long it will take to drive it. You are also
given a listing of the major towns you go through, and the
highway you need to take to get there, and how long it will take
to drive each segment. I thought this was really neat! In
reading Butterfield's documentation, he indicated that the
program was written in BASIC and that the data files were easy to
modify to add your own favorite towns in. As I played with it
more, I found that he had rewritten the program in C language
which helps explain why it runs so fast. Also, only interstates
and major throughways were entered. For instance to go from
Tulsa to Kansas City required going to Oklahoma City and then to
Wichita and then to KC. I thought I would add more towns in and
around Oklahoma to the program. I got a map of the United States
and then printed out the file which contained the routes. I
highlighted the US map with these routes to see what was included
and what wasn't. Butterfield had entered nearly every major city
in the United States and Canada. I was impressed! I obtained an
Oklahoma map and started adding Oklahoma cities. There are two
files that need to be changed: Roads and Cities. Roads contains
data in the format: 'city1,city2,distance,time,highway'. Cities
contains data in the format 'city,state'. I highlighted the
roads on the state maps as I added the routes to the program.
After adding cities to Oklahoma, I needed to tie them in to the
surrounding states. Gary Delzer offered to help ... he tackled
Kansas, Colorado, and New Mexico. I added Texas, Nebraska,
Louisiana, Arkansas, Mississippi, and Missouri. The trouble with
adding new cities is deciding where to stop. Hopefully, data can
be added (by other computer clubs - hint,hint, nudge,nudge, say
no more, say no more) to cover the entire US (or world!). It is
amazingly quick to tell it you want to go from Key West, Florida
to Bangor, Maine via Seattle, Washington and immediately get a
listing of the shortest route. Sometimes it will find two routes
- one is shorter, but the other is quicker. Gary found that by
giving a CLI command of "RoadRoute > par:", the screen prompts
are shown on the screen, but the listing of the routes is sent to
the printer. By having two versions of the program running at
the same time, you can have one running normally, and one
directed to the printer parallel port. Play with the normal
program until you find a combo you want a printout of and then
switch to the other program to reenter those cities to get your
printout. I might even send the program back to Fred Fish (and
Butterfield) to circulate the SouthMidWest data version around.
If any other clubs do expand this program, let me know - I am
interested in swapping with you. Send me your disk with a self
addressed stamped envelope and I will send you back my version on
your disk. Be sure to put a note on it as to what states you
have added. Add your cities and routes to the beginning of the
files. Include a printout of both files with the cities and
routes that you have added highlighted. I have developed a few
hints on how to do add to the program.
1) Work with a state map and highlight what you are
inputting - otherwise you get hopelessly lost.
2) Know what is already on the program.
3) Add towns that are obvious hubs and will serve as change
of direction points. Also add popular vacation sites or places
people will want to go to.
4) Use common sense in estimating driving times. If your
route is on an interstate, you can use 60 mph (a mile a minute)
pretty safely. Estimate time to the nearest 5 minutes. If the
route goes through several small towns and is a 'black' road on
the map, use 50 mph as an average - or even slower if you know of
hills, or other congestion that would slow you down. Don't
include 'grey' roads unless you leave a big open area by not
doing so. The 'red' roads can be closer to 60 mph if in wide
open country.
5) If you add towns in between the towns already in the
program, make sure that the mileages and times match. If you are
going straight through, the program will take the big jumps. If
you need to make turns, it will utilize the intermediate towns.
If the times or mileages don't match, you may find that it will
give an alternate route that is actually the same route with
different driving times. I ended up changing a lot of
Butterfield's times in the areas I covered because I felt they
were overly conservative. He used 50-55 avg for interstates. I
moved the interstates on up to 60.
6) When you add cities, be sure to tie the city in to
existing adjacent cities by every usable route - otherwise you
will have to go well out of your way to get to an adjacent city.
7) I use WordPerfect to add the routes to 'Roads' first.
Then I save the document as a text file (Cntrl F5), use the
sizing gadget to reduce the width of the screen and move the
screen to the right half of the monitor. Then switch to a new
document (Shift F3) and open 'Cities'. Click on the background
gadget to put 'Cities' behind 'Roads'. Now you can type on
document #2 (Cities) on the left half of the screen while
document #1 (Roads) is on the right half of the screen. Add the
new towns to 'Cities'. You can scroll 'Roads' up and down as
needed to see what you have added. Now, click these in the
background so you can get back to Workbench. Open the RoadRoute
disk and run the program. If it doesn't run, it will tell you
where your problem is. Usually you haven't entered all the
cities, you have misspelled something, you have added a city
which has a duplicate name in another state (this is easily
handled by adding '/state' after the name in the route file. For
example, Buffalo/Oklahoma, Buffalo/New York, Buffalo/Texas), you
have entered a city twice or entered a city that Butterfield
already had entered - most of the errors are obvious except
having a city in twice. That one threw me for a while. Once you
find the problem, click WordPerfect back to the foreground, make
your corrections, save the files, and try running the RoadRoute
program again so that it accesses the new version of the files.
Not having to quit and reenter your wordprocessor each time by
taking advantage of multi-tasking is really a time saver.
This new program disk is in the CUB Amiga library under the title
RoadRoute.
This is a neat program. Thanks, Jim!!!
Fred Mayes
Commodore Users of Bartlesville
2524 SW Mountain Road
Bartlesville OK, 74003
Note to Jim Butterfield:
A suggestion for the next version: I have added enough cities
for the list of available cities in a state to scroll off
screen. There should be some provision to handle this - perhaps
show a screen at a time or have the ability to scroll back up the
list.